home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / Mesa-1.2.1 / include / GL / amesa.h next >
Encoding:
C/C++ Source or Header  |  1995-07-05  |  2.5 KB  |  114 lines

  1. /* amesa.h */
  2.  
  3. /*
  4.  * Mesa 3-D graphics library
  5.  * Version:  1.2
  6.  * Copyright (C) 1995  Brian Paul  (brianp@ssec.wisc.edu)
  7.  *
  8.  * This library is free software; you can redistribute it and/or
  9.  * modify it under the terms of the GNU Library General Public
  10.  * License as published by the Free Software Foundation; either
  11.  * version 2 of the License, or (at your option) any later version.
  12.  *
  13.  * This library is distributed in the hope that it will be useful,
  14.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  16.  * Library General Public License for more details.
  17.  *
  18.  * You should have received a copy of the GNU Library General Public
  19.  * License along with this library; if not, write to the Free
  20.  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  */
  22.  
  23.  
  24. /*
  25. $Id: amesa.h,v 1.4 1995/05/22 17:03:21 brianp Exp $
  26.  
  27. $Log: amesa.h,v $
  28.  * Revision 1.4  1995/05/22  17:03:21  brianp
  29.  * Release 1.2
  30.  *
  31.  * Revision 1.3  1995/03/31  15:22:40  brianp
  32.  * changed XMESA_H to AMESA_H
  33.  *
  34.  * Revision 1.2  1995/03/04  19:45:47  brianp
  35.  * 1.1 beta revision
  36.  *
  37.  * Revision 1.1  1995/02/28  21:21:03  brianp
  38.  * Initial revision
  39.  *
  40.  */
  41.  
  42.  
  43. /*
  44.  * Mesa/Amiga interface.  Warning:  the src/amesa.c file is out of date
  45.  * and doesn't work at this time.
  46.  */
  47.  
  48.  
  49. /* Example usage:
  50.  
  51. 1. Make a window using Intuition calls
  52.  
  53. 2. Call AMesaCreateContext() to make a rendering context and attach it
  54.    to the window made in step 1.
  55.  
  56. 3. Call AMesaMakeCurrent() to make the context the active one.
  57.  
  58. 4. Make gl* calls to render your graphics.
  59.  
  60. 5. When exiting, call AMesaDestroyContext().
  61.  
  62. */
  63.  
  64.  
  65.  
  66. #ifndef AMESA_H
  67. #define AMESA_H
  68.  
  69.  
  70. #include <intuition/intuition.h>
  71. #include "GL/gl.h"
  72.  
  73.  
  74. typedef struct amesa_context *AMesaContext;
  75.  
  76.  
  77.  
  78. /*
  79.  * Attach a Mesa rendering context to an Amiga Intuition window.
  80.  * Input:  window - the Intuition window ptr
  81.  *         db_flag - should it be double buffered?
  82.  *         rgb_flag - should RGB mode be simulated?
  83.  */
  84. extern AMesaContext AMesaCreateContext( struct Window *window,
  85.                         GLboolean db_flag,
  86.                         GLboolean rgb_flag );
  87.  
  88.  
  89. /*
  90.  * Destroy a context made by AMesaCreateContext.
  91.  */
  92. extern void AMesaDestroyContext( AMesaContext ctx );
  93.  
  94.  
  95. /*
  96.  * Make the specified context the current context.
  97.  */
  98. extern int AMesaMakeCurrent( AMesaContext ctx );
  99.  
  100.  
  101. /*
  102.  * Return a handle to the current context.
  103.  */
  104. extern AMesaContext AMesaGetCurrentContext( void );
  105.  
  106.  
  107. /*
  108.  * Copy the back buffer to the front.
  109.  */
  110. extern void AMesaSwapBuffers( void );
  111.  
  112.  
  113. #endif
  114.